package sk.funix.userstory.service;

import java.util.List;

import sk.funix.userstory.domain.Story;
import sk.funix.userstory.domain.User;

/**
 * @author Nicolas Milliard
 *
 */
public interface StoryService {


	/**
	 * @param story
	 * @return
	 */
	public Story addNewStory(Story story);


	/**
	 * @param story
	 */
	public void updateAnStory(Story story);


	/**
	 * @param story
	 */
	public void deleteAnStory(Story story);


	/**
	 * @param id
	 */
	public abstract void deleteAnStoryById(Long id);


	/**
	 * @param id
	 * @return
	 */
	public Story findStoryById(Long id);


	/**
	 * @return
	 */
	public List<Story> findAllStories();


	/**
	 * @param firstResult
	 * @param maxResults
	 * @return
	 */
	public List<Story> findStorysEntries(int firstResult,
			int maxResults);


	/**
	 * @return
	 */
	public long countAllStories();
	
	public long countAllStoriesByUser(User user);
	
	public List<Story> findAllStoriesByUser(User user);

	
	public List<Story> findEntriesStoriesByUser(User user, int firstResult, int maxResults);


}